import http from "@/utils/request"

export default {
    ${business}: {
    <#if genAdd>
        add: {
            url: '/${module}/${business}/add',
            name: "新增${function}",
            post: function (data) {
                return http.post(this.url, data);
            }
        },
    </#if>
    <#if genRemove>
        remove: {
            url: '/${module}/${business}/remove',
            name: "删除${function}",
            delete: function (data) {
                return http.delete(this.url, data);
            }
        },
    </#if>
    <#if genEdit>
        edit: {
            url: '/${module}/${business}/edit',
            name: "编辑${function}",
            put: function (data) {
                return http.put(this.url, data);
            }
        },
    </#if>
<#if genPage>
    <#if genPageTableType == '1'>
        page: {
            url: '/${module}/${business}/page',
            name: "${function}分页",
            get: function (params) {
                return http.get(this.url, params);
            }
        }
    <#else>
        list: {
            url: '/${module}/${business}/list',
            name: "${function}列表",
            get: function (params) {
                return http.get(this.url, params);
            }
        }
    </#if>
</#if>
    }
}
